<!-- 这个是二次封装element组件 emit方法参数 -->
<template>
  <el-pagination
  :current-page="currentPage"
  :background="background"
  :total="total"
  :pageSize="pageSize"
  :page-sizes="[5, 10, 20]"
  layout="total, sizes, prev, pager, next, jumper"
  @size-change="handleSizeChange"
  @current-change="handleCurrentChange"
  />
</template>

<script setup lang="ts">
defineProps({
  currentPage: Number,
  pageSize: Number,
  total: Number,
  background: {
    type: Boolean,
    default: true
  },
})
const emit=defineEmits(['SizeChange','CurrentChange'])
const handleCurrentChange=(value:number)=>{
      // console.log(value);
      emit('CurrentChange',value)
}
const handleSizeChange=(value:number)=>{
      console.log(value);
      emit('SizeChange',value)
}

</script>

<style scoped></style>
